package com.thejoyrun.retrofit.http.exception;

/**
 * Created by kkmike999 on 2016/05/08.
 *
 * 错误信息
 */
public class ServerException extends RuntimeException {

	/** 服务器错误码 */
	int code;

	public ServerException(int code, String message) {
		super(message);
		this.code = code;
	}

	public int getCode() {
		return code;
	}

	@Override
	public String toString() {
		return getClass().getName() + ":{" +
				" code = " + code + " , " + getMessage() +
				" }";
	}
}
